/*
 * ConsoleRemoveAction.java
 * 
 * Copyright 2007 Kamen Petroff.
 * All Rights Reserved.
 * 
 * This software is the proprietary information of Kamen Petroff.
 * Use is subject to license terms.
 * 
 * Created on Mar 2, 2007 at 5:39:21 PM by Kamen Petroff
 */
package com.google.code.shell4eclipse.console;

import org.eclipse.jface.action.Action;
import org.eclipse.ui.console.IConsole;

import com.google.code.shell4eclipse.IShell4EclipseConstants;
import com.google.code.shell4eclipse.Shell4EclipsePlugin;

/**
 * 
 *
 * @author Kamen Petroff 
 * @since Mar 2, 2007
 */
public class ConsoleRemoveAction extends Action {


	private Shell4EclipseConsole console;

	public ConsoleRemoveAction(IConsole console) {
		this.console = (Shell4EclipseConsole)console;
		setText("Close shell");
		setImageDescriptor(Shell4EclipsePlugin.getImageDescriptor(IShell4EclipseConstants.IMG_S4E_CLOSE_CONSOLE_ENABLED));
		setDisabledImageDescriptor(Shell4EclipsePlugin.getImageDescriptor(IShell4EclipseConstants.IMG_S4E_CLOSE_CONSOLE_DISABLED));
	}
	
	@Override
	public void run() {
		console.close();
	}
}
